﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ImModels.View
{
    /// <summary>
    /// 请求回应默认视图
    /// </summary>
    public class ResView
    {
        /// <summary>
        /// code 200 成功 其他为错误码 默认为 500
        /// </summary>
        public int code { get; set; } = 500;

        /// <summary>
        /// 描述信息
        /// </summary>
        public string msg { get; set; } = "";

        /// <summary>
        /// 数据对象
        /// </summary>
        public object? data { get; set; }
    }

    /// <summary>
    /// 请求回应默认视图
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public class ResView<T>
    {
        /// <summary>
        /// code 200 成功 其他为错误码 默认为 500
        /// </summary>
        public int code { get; set; } = 500;

        /// <summary>
        /// 描述信息
        /// </summary>
        public string msg { get; set; } = "";

        /// <summary>
        /// 数据体
        /// </summary>
        public T? data { get; set; }
    }
}
